<template>
  <div class="p-15px">
    Message消息提示<br /><br />
    <el-button plain @click="infoButton">默认提示</el-button>
    <el-button type="warning" plain @click="warningButton">警告提示</el-button>
    <el-button type="success" plain @click="successButton">成功提示</el-button>
    <el-button type="danger" plain @click="errorButton">错误提示</el-button>
    <el-button type="primary" plain @click="anyButton">任意提示</el-button>
  </div>
</template>

<script setup lang="ts">
import {
  koiMsg,
  koiMsgInfo,
  koiMsgWarning,
  koiMsgSuccess,
  koiMsgError,
} from "@/utils/koi.ts";

const infoButton = () => {
  koiMsgInfo("默认提示", 3000);
};

const warningButton = () => {
  koiMsgWarning("警告提示", 3000);
};

const successButton = () => {
  koiMsgSuccess("成功提示", 2000);
};

const errorButton = () => {
  koiMsgError("错误提示", 5000);
};

const anyButton = () => {
  koiMsg("任意提示", 2000, "success");
};
</script>

<style scoped></style>
